import { BasePanel } from "../../core/base/BasePanel";
import { EventManager } from "../../core/manager/EventManager";
import { EventData } from "../../core/data/EventData";

export class LoadPanel extends BasePanel {
	constructor() {
		super();
		this.skinName = "zSkins.LoadPanelSkin";
	}
	public labProgress: eui.Label;

	public addEvent(): void {
		EventManager.register(EventData.RES_LOAD_PROGRESS, this.onProgress, this);
	}

	public init(): void {
		// TODO 初始化操作
	}

	private onProgress(data): void {
		let result = data.data;
		this.labProgress.text = result.name + " loading..." + result.progress;
	}

}